package net.micro.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import net.micro.core.controller.BaseController;
import net.micro.domain.AjaxResult;
import net.micro.service.RoleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;

@Tag(name = "权限模块")
@RestController
@RequestMapping("/api/role/v1/")
public class RoleController extends BaseController {
    @Resource
    private RoleService roleService;
    @Operation(summary = "获取菜单", description = "根据id查看地址详情")
    @GetMapping(value = "/auth")
    public AjaxResult menu() {
        return success(roleService.menuTree());
    }

    @Operation(summary = "退出登录", description = "退出登录")
    @GetMapping(value = "/logout")
    public AjaxResult logout() {
        return success(new ArrayList<>());
    }


    @Operation(summary = "获取字典", description = "获取字典")
    @GetMapping(value = "/permission/getAllDictApi")
    public AjaxResult getAllDictApi() {
        return success(new ArrayList<>());
    }
}
